package work.Work4;

public class Demo4 {
    public static void main(String[] args) {
                Inter i = new Inter() {
                    @Override
                    public void method() {
                        System.out.println("这是我重新写的method");
                    }
        };
        System.out.println(Inter.num);
        i.method();
    }
    interface Inter{
        int num = 10;
        void method();
    }
}
